<?php

class ForeachComponent extends BlueprintComponent {
	
	
	function parse(&$element, $statement) {
		$doc = $element->document;
		
		$text = "foreach ($statement) {";
		
		$element->parentNode->insertBefore($doc->createPHPNode($text), $element);
		$element->parentNode->insertBefore($doc->createPHPNode("}"), $element->nextSibling);
	}
	
}
?>